package com.zf.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zf.system.mapper.CustomerMapper;
import com.zf.system.domain.Customer;
import com.zf.system.service.ICustomerService;

/**
 * 前端用户信息Service业务层处理
 *
 * @author ruoyi
 * @date 2024-09-28
 */
@Service
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements ICustomerService {
    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public Long selectCustomerIdByCustomerName(String customerName) {
        return customerMapper.selectCustomerIdByCustomerName(customerName);
    }

    @Override
    public List<Customer> selectCustomerNameList() {
        return customerMapper.selectCustomerNameList();
    }

    /**
     * 查询前端用户信息
     *
     * @param customerId 前端用户信息主键
     * @return 前端用户信息
     */
    @Override
    public Customer selectCustomerByCustomerId(Long customerId) {
        return customerMapper.selectCustomerByCustomerId(customerId);
    }

    /**
     * 查询前端用户信息列表
     *
     * @param customer 前端用户信息
     * @return 前端用户信息
     */
    @Override
    public List<Customer> selectCustomerList(Customer customer) {
        return customerMapper.selectCustomerList(customer);
    }

    /**
     * 新增前端用户信息
     *
     * @param customer 前端用户信息
     * @return 结果
     */
    @Override
    public int insertCustomer(Customer customer) {
        return customerMapper.insertCustomer(customer);
    }

    /**
     * 修改前端用户信息
     *
     * @param customer 前端用户信息
     * @return 结果
     */
    @Override
    public int updateCustomer(Customer customer) {
        return customerMapper.updateCustomer(customer);
    }

    /**
     * 批量删除前端用户信息
     *
     * @param customerIds 需要删除的前端用户信息主键
     * @return 结果
     */
    @Override
    public int deleteCustomerByCustomerIds(Long[] customerIds) {
        return customerMapper.deleteCustomerByCustomerIds(customerIds);
    }

    /**
     * 删除前端用户信息信息
     *
     * @param customerId 前端用户信息主键
     * @return 结果
     */
    @Override
    public int deleteCustomerByCustomerId(Long customerId) {
        return customerMapper.deleteCustomerByCustomerId(customerId);
    }
}